<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title></title>
		<meta name="description" content="overview & stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link href="static/css/bootstrap.min.css" rel="stylesheet" />
		<link href="static/css/bootstrap-responsive.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="static/css/font-awesome.min.css" />
		<!-- 下拉框 -->
		<link rel="stylesheet" href="static/css/chosen.css" />
		
		<link rel="stylesheet" href="static/css/ace.min.css" />
		<link rel="stylesheet" href="static/css/ace-responsive.min.css" />
		<link rel="stylesheet" href="static/css/ace-skins.min.css" />
		
		<link rel="stylesheet" href="static/css/bootstrap-datetimepicker.css" /><!-- 日期框 -->
		<link rel="stylesheet" href="static/css/datepicker.css" /><!-- 日期框 -->
		<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="static/js/jquery.tips.js"></script>
		<script type="text/javascript" src="static/js/bootstrap-datetimepicker.js"></script><!-- 日期框 -->
		<style type="text/css">
		</style>
<script type="text/javascript">
	
	//保存
	function save(){
		if($("#base_name").val()==""){
			$("#base_name").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_name").focus();
			return false;
		}
		if($("#base_sex").val()==""){
			$("#base_sex").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_sex").focus();
			return false;
		}
		if($("#base_identity").val()==""){
			$("#base_identity").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_identity").focus();
			return false;
		}
		if($("#base_birthday").val()==""){
			$("#base_birthday").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_birthday").focus();
			return false;
		}
		if($("#base_nationality").val()==""){
			$("#base_nationality").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_nationality").focus();
			return false;
		}
		if($("#base_native_place").val()==""){
			$("#base_native_place").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_native_place").focus();
			return false;
		}
		if($("#base_politics").val()==""){
			$("#base_politics").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_politics").focus();
			return false;
		}
		if($("#base_phone").val()==""){
			$("#base_phone").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_phone").focus();
			return false;
		}
		if($("#base_marriage").val()==""){
			$("#base_marriage").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_marriage").focus();
			return false;
		}
		if($("#base_record_number").val()==""){
			$("#base_record_number").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_record_number").focus();
			return false;
		}
		if($("#base_record_position").val()==""){
			$("#base_record_position").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_record_position").focus();
			return false;
		}
		if($("#base_email").val()==""){
			$("#base_email").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_email").focus();
			return false;
		}
		if($("#base_address").val()==""){
			$("#base_address").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_address").focus();
			return false;
		}
		if($("#base_education_background").val()==""){
			$("#base_education_background").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_education_background").focus();
			return false;
		}
		if($("#base_graduation").val()==""){
			$("#base_graduation").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_graduation").focus();
			return false;
		}
		if($("#base_major").val()==""){
			$("#base_major").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_major").focus();
			return false;
		}
		if($("#base_employee_type").val()==""){
			$("#base_employee_type").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_employee_type").focus();
			return false;
		}
		if($("#photo").attr("src")==""){
			$("#base_photo").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_photo").focus();
			return false;
		}
		if($("#user_id").val()==""){
			$("#user_id").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#user_id").focus();
			return false;
		}
		if($("#company_id").val()==""){
			$("#company_id").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#company_id").focus();
			return false;
		}
		if($("#filiale_id").val()==""){
			$("#filiale_id").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#filiale_id").focus();
			return false;
		}
		if($("#base_createtime").val()==""){
			$("#base_createtime").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_createtime").focus();
			return false;
		}
		if($("#base_updatetime").val()==""){
			$("#base_updatetime").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#base_updatetime").focus();
			return false;
		}
		$("#Form").submit();
		$("#zhongxin").hide();
		$("#zhongxin2").show();
	}
	
</script>
	</head>
<body>
	<form action="employee/${msg }.do" name="Form" id="Form" method="post" enctype="multipart/form-data">
		<input type="hidden" name="base_id" id="base_id" value="${pd.base_id}"/>
		<div id="zhongxin">
		<fieldset>
			<legend>基本信息表</legend>
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">姓名:</td>
				<td style="width:70px;"><input type="text" name="base_name" id="base_name" value="${pd.base_name}" maxlength="32" placeholder="这里输入" title=""/></td>
				<td style="width:70px;text-align: right;padding-top: 13px;">性别:</td>
				<td><input name="base_sex" id="base_sex1" type="radio" checked="checked" value="0"><span class="lbl">&nbsp;男</span>
					<input name="base_sex" id="base_sex2" type="radio" value="1"><span class="lbl">&nbsp;女</span></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">身份证号:</td>
				<td><input type="text" name="base_identity" id="base_identity" value="${pd.base_identity}" maxlength="32" placeholder="这里输入" title=""/></td>
				<td style="width:70px;text-align: right;padding-top: 13px;">出生日期:</td>
				<td><input type="text" name="base_birthday" id="base_birthday" readonly value="${pd.base_birthday}" class="date-picker"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">民族:</td>
				<td><input type="text" name="base_nationality" id="base_nationality" value="${pd.base_nationality}" maxlength="32" placeholder="这里输入" title=""/></td>
				<td style="width:70px;text-align: right;padding-top: 13px;">籍贯:</td>
				<td><input type="text" name="base_native_place" id="base_native_place" value="${pd.base_native_place}" maxlength="32" placeholder="这里输入" title=""/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">政治面貌:</td>
				<td><input type="text" name="base_politics" id="base_politics" value="${pd.base_politics}" maxlength="32" placeholder="这里输入" title=""/></td>
				<td style="width:70px;text-align: right;padding-top: 13px;">联系电话:</td>
				<td><input type="text" name="base_phone" id="base_phone" value="${pd.base_phone}" maxlength="32" placeholder="这里输入" title=""/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">婚姻状态:</td>
				<td>
					<select  name="base_marriage" id="base_marriage"  data-placeholder="请选择" style="vertical-align:top;width: 100px;">
								<option value="0" <c:if test="${pd.base_marriage==0}" >selected="selected" </c:if>>未婚</option>
								<option value="1" <c:if test="${pd.base_marriage==1}" >selected="selected" </c:if>>已婚</option>
								<option value="2" <c:if test="${pd.base_marriage==2}" >selected="selected" </c:if>>离异</option>
					</select>
				</td>
				<td style="width:70px;text-align: right;padding-top: 13px;">邮箱:</td>
				<td><input type="text" name="base_email" id="base_email" value="${pd.base_email}" maxlength="32" placeholder="这里输入" title=""/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">现住址:</td>
				<td><input type="text" name="base_address" id="base_address" value="${pd.base_address}" maxlength="32" placeholder="这里输入" title=""/>
				</td>
				
				<td style="width:70px;text-align: right;padding-top: 13px;">学历:</td>
				<td>
					<select  name="base_education_background" id="base_education_background"  data-placeholder="请选择" style="vertical-align:top;width: 100px;">
						<option value="0" <c:if test="${pd.base_education_background==0}" >selected="selected" </c:if>>小学</option>
						<option value="1" <c:if test="${pd.base_education_background==1}" >selected="selected" </c:if>>初中</option>
						<option value="2" <c:if test="${pd.base_education_background==2}" >selected="selected" </c:if>>中专</option>
						<option value="3" <c:if test="${pd.base_education_background==3}" >selected="selected" </c:if>>高中</option>
						<option value="4" <c:if test="${pd.base_education_background==4}" >selected="selected" </c:if>>大专</option>
						<option value="5" <c:if test="${pd.base_education_background==5}" >selected="selected" </c:if>>本科</option>
						<option value="6" <c:if test="${pd.base_education_background==6}" >selected="selected" </c:if>>硕士研究生</option>
						<option value="7" <c:if test="${pd.base_education_background==7}" >selected="selected" </c:if>>博士研究生</option>
					</select>
				</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">毕业院校:</td>
				<td><input type="text" name="base_graduation" id="base_graduation" value="${pd.base_graduation}" maxlength="32" placeholder="这里输入" title=""/></td>
			
				<td style="width:70px;text-align: right;padding-top: 13px;">专业:</td>
				<td><input type="text" name="base_major" id="base_major" value="${pd.base_major}" maxlength="32" placeholder="这里输入" title=""/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工类型:</td>
				<td>
					<select  name="base_employee_type" id="base_employee_type"  data-placeholder="请选择" style="vertical-align:top;width: 100px;">
						<option value="0" <c:if test="${pd.base_employee_type==0}" >selected="selected" </c:if>>合同</option>
						<option value="1" <c:if test="${pd.base_employee_type==1}" >selected="selected" </c:if>>临时</option>
						<option value="2" <c:if test="${pd.base_employee_type==2}" >selected="selected" </c:if>>返聘</option>
					</select>
				</td>
				<td align="right">请选择部门:</td>
				<td>
				<select class="chzn-select" name="department_id" id="department_id" style="vertical-align:top;">
				<option value="">请选择部门:</option>
				<c:forEach items="${deptList}" var="department">
					<option value="${department.departmentId }" 
					<c:if test="${department.departmentId == pd.department_id }">selected</c:if>
					>${department.departmentName }
					</option>
				</c:forEach>
				</select>
				</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">照片:</td>
				<td colspan="3">
					<input type="file" id="base_photo" name="base_photo" onchange="setPhoto();" style="display:none;">
                    <label id="setPhoto" for="base_photo" style="display:block;width:80px;height:80px;background-color:white;text-align: center;line-height:80px;">
                    <img id="photo" alt="+" src="<%=basePath%>${pd.base_photo }"></label>
				</td>
			</tr>
		</table>
		</fieldset>
		<fieldset>
			<legend>工作经历表</legend>
		<table class="table table-striped table-bordered table-hover">
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">入职时间:</td>
				<td style="width:70px;"><input type="text" name="work_entrytime" id="work_entrytime" value="${pd.work_entrytime}" readonly class="date-picker"/></td>
				
				<td style="width:70px;text-align: right;padding-top: 13px;">职位:</td>
				<td><input type="text" name="work_position" id="work_position" value="${pd.work_position}" maxlength="32" placeholder="这里输入" title=""/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">工作经验:</td>
				<td><input type="text" name="work_workingage" id="work_workingage" value="${pd.work_workingage}" maxlength="32" placeholder="这里输入" title=""/></td>
				<td style="width:70px;text-align: right;padding-top: 13px;">就职状态:</td>
				<td>
					<select  name="work_status" id="work_status"  data-placeholder="请选择" style="vertical-align:top;width: 100px;">
						<option value="0" <c:if test="${pd.work_status==0}" >selected="selected" </c:if>>试用</option>
						<option value="1" <c:if test="${pd.work_status==1}" >selected="selected" </c:if>>在岗</option>
						<option value="2" <c:if test="${pd.work_status==2}" >selected="selected" </c:if>>待岗</option>
						<option value="3" <c:if test="${pd.work_status==3}" >selected="selected" </c:if>>见习</option>
						<option value="4" <c:if test="${pd.work_status==4}" >selected="selected" </c:if>>离职</option>
						<option value="5" <c:if test="${pd.work_status==5}" >selected="selected" </c:if>>退休</option>
					</select>
				</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">编号:</td>
				<td><input type="text" name="work_serial_number" id="work_serial_number" value="${pd.work_serial_number}" maxlength="16" placeholder="这里输入" title=""/></td>
				<td style="width:70px;text-align: right;padding-top: 13px;">工号:</td>
				<td><input type="text" name="work_job_number" id="work_job_number" value="${pd.work_job_number}" maxlength="16" placeholder="这里输入" title=""/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">特长:</td>
				<td><input type="text" name="work_speciality" id="work_speciality" value="${pd.work_speciality}" maxlength="32" placeholder="这里输入" title=""/></td>
				<td style="width:70px;text-align: right;padding-top: 13px;">驾驶证:</td>
				<td>
					<select  name="work_driver_licence" id="work_driver_licence"  data-placeholder="请选择" style="vertical-align:top;width: 100px;">
						<option value="0" <c:if test="${pd.work_driver_licence==0}" >selected="selected" </c:if>>A1</option>
						<option value="1" <c:if test="${pd.work_driver_licence==1}" >selected="selected" </c:if>>A2</option>
						<option value="2" <c:if test="${pd.work_driver_licence==2}" >selected="selected" </c:if>>A3</option>
						<option value="3" <c:if test="${pd.work_driver_licence==3}" >selected="selected" </c:if>>B1</option>
						<option value="4" <c:if test="${pd.work_driver_licence==4}" >selected="selected" </c:if>>B2</option>
						<option value="5" <c:if test="${pd.work_driver_licence==5}" >selected="selected" </c:if>>C1</option>
						<option value="6" <c:if test="${pd.work_driver_licence==6}" >selected="selected" </c:if>>C2</option>
						<option value="7" <c:if test="${pd.work_driver_licence==7}" >selected="selected" </c:if>>C3</option>
						<option value="8" <c:if test="${pd.work_driver_licence==8}" >selected="selected" </c:if>>C4</option>
					</select>
				</td>
			</tr>
		</table>
		</fieldset>
		<fieldset>
			<legend>家庭背景表</legend>
			<table class="table table-striped table-bordered table-hover">
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">称谓:</td>
					<td><input type="text" name="relation_appellation1" id="relation_appellation1" value="${pd.relation_appellation1}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">称谓:</td>
					<td><input type="text" name="relation_appellation2" id="relation_appellation2" value="${pd.relation_appellation2}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">称谓:</td>
					<td><input type="text" name="relation_appellation3" id="relation_appellation3" value="${pd.relation_appellation3}" maxlength="32" placeholder="这里输入" title=""/></td>
				</tr>
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">姓名:</td>
					<td><input type="text" name="relation_name1" id="relation_name1" value="${pd.relation_name1}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">姓名:</td>
					<td><input type="text" name="relation_name2" id="relation_name2" value="${pd.relation_name2}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">姓名:</td>
					<td><input type="text" name="relation_name3" id="relation_name3" value="${pd.relation_name3}" maxlength="32" placeholder="这里输入" title=""/></td>
				</tr>
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">年龄:</td>
					<td><input type="text" name="relation_age1" id="relation_age1" value="${pd.relation_age1}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">年龄:</td>
					<td><input type="text" name="relation_age2" id="relation_age2" value="${pd.relation_age2}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">年龄:</td>
					<td><input type="text" name="relation_age3" id="relation_age3" value="${pd.relation_age3}" maxlength="32" placeholder="这里输入" title=""/></td>
				</tr>
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">电话:</td>
					<td><input type="text" name="relation_phone1" id="relation_phone1" value="${pd.relation_phone1}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">电话:</td>
					<td><input type="text" name="relation_phone2" id="relation_phone2" value="${pd.relation_phone2}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">电话:</td>
					<td><input type="text" name="relation_phone3" id="relation_phone3" value="${pd.relation_phone3}" maxlength="32" placeholder="这里输入" title=""/></td>
				</tr>
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">工作单位:</td>
					<td><input type="text" name="relation_workplace1" id="relation_workplace1" value="${pd.relation_workplace1}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">工作单位:</td>
					<td><input type="text" name="relation_workplace2" id="relation_workplace2" value="${pd.relation_workplace2}" maxlength="32" placeholder="这里输入" title=""/></td>
					<td style="width:70px;text-align: right;padding-top: 13px;">工作单位:</td>
					<td><input type="text" name="relation_workplace3" id="relation_workplace3" value="${pd.relation_workplace3}" maxlength="32" placeholder="这里输入" title=""/></td>
				</tr>
				<tr>
					<td style="text-align: center;" colspan="10">
						<a class="btn btn-mini btn-primary" onclick="save();">保存</a>
						<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
					</td>
				</tr>
			</table>
		</fieldset>
		</div>
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
		
	</form>
	
	
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript">
		$(top.hangge());
		$(function() {
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			$('.date-picker').datepicker(
					{
		                autoclose:true,
		                format: "yyyy-mm-dd",
		                language: 'cn',
		                clearBtn:true,
		                todayHighlight: true
		            }
				);
			
			//日期框
			$(".form_datetime").datetimepicker({format: 'yyyy-mm-dd',autoclose: true});
			
		});
		
		//图片预览
		function setPhoto(){
			var docObj=document.getElementById("base_photo");
			$("#photo").attr("src",window.URL.createObjectURL(docObj.files[0]));
		}
		
		</script>
</body>
</html>